<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class HomeController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth', ['except' => ['forget']]);
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $user = Auth::User();
        return view('home')->with('user', $user);
    }

    /**
     * 显示忘记密码
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function forget()
    {
        $user = Auth::User();
        return view('home')->with('user', $user);
    }

}
